@extends('layouts.admin')
@section('content')
<style>
	.maptip {
		position: fixed;
		width: 156px;
		background-color: #0e0d0dab;
		z-index: 999999;
		margin-right:13px;
		right: 25%;
		top: 0;
		padding: 15px;
	}
	
	.maptip p {
		width: 100%;
		height: 30px;
		color: #fff;
		line-height: 30px;
	}
	.maptip p span{
		display:inline-block;
		width: 36px !important;
	}
	.uyrse {
		background-color: #409EFF;
		color: #fff;
		border: none;
		height: 25px;
		display: inline-flex;
		justify-content: center;
		align-items: center;
		position: relative;
		top: -2px;
		border-radius: 3px;
	}
	.uyrse2{
		background-color: #409EFF;
		color:#fff;
		border:none;
		height:25px;
		display:inline-flex;
		justify-content:center;
		align-items:center;
		position:relative;
		top:-2px;
		border-radius:3px;
		padding:3px 10px;
		margin-left:15px;
	}
	.btndiv{
		width:100%;height:40px;margin: -10px 0 10px 0;
		display:none;
		flex-direction:row;
		justify-content:flex-start;
		align-items:center;
	}
</style>
<div id="allmap" class="allmap"></div>
<div class="maptip">
	<p><span>绿色</span> ：放心单位</p>
	<p><span>红色</span> ：关注单位</p>
	<p><span>深红色</span> ：重点关注单位</p>
	<p><span>圆形</span> ：企业</p>
	<p><span>三角形</span> ：九小场所</p>
	<p><span>星形</span> ：住户</p>
</div>
<div class="pane">


	<!--第一-->
	<div class="btnSearch diyi-s" style="margin-bottom:10px;">
		<input type="text" class="sousuors" name="company" id="company" value="" /><button class="uyrse"
			id="btnSearch">搜 索</button>
		<div class="btndiv" id="btndiv">
			<button class="uyrse2" onclick="tomap3()">只显示仓库</button>
			<button class="uyrse2" onclick="tomapall()">显示全部</button>
		</div>
		<div class="layui-form-item0">
			<label class="layui-form-label0">企业：</label>
			<div class="layui-input-block0">
				@foreach($categories as $cate)
				@if($cate['type']==1)

				<div class="tuyes easyui-linkbutton l-btn l-btn-small layui-input-block0">
					<input style="" class="easyui-checkbox" name="category" value="{{$cate['id']}}"
						label="{{$cate['name']}}">
				</div>
				@endif
				@endforeach
			</div>
		</div>
		<div class="layui-form-item0">
			<label class="layui-form-label0">住户：</label>
			<div class="layui-input-block0">
				@foreach($categories as $cate)
				@if($cate['type'] == 2)

				<div class="tuyes easyui-linkbutton l-btn l-btn-small layui-input-block0"
					style="display: inline-block;">

					<input style="" class="easyui-checkbox" name="category" value="{{$cate['id']}}"
						label="{{$cate['name']}}">
				</div>
				@endif
				@endforeach
			</div>
		</div>
		<div class="layui-form-item0">
			<label class="layui-form-label0">九小场所：</label>
			<div class="layui-input-block0">
				@foreach($categories as $cate)
				@if($cate['type'] == 9)

				<div class="tuyes easyui-linkbutton l-btn l-btn-small layui-input-block0"
					style="display: inline-block;">

					<input style="" class="easyui-checkbox" name="category" value="{{$cate['id']}}"
						label="{{$cate['name']}}">
				</div>
				@endif
				@endforeach
			</div>
		</div>
	</div>
	<div class="tabs-wrap" id="hues" style="margin-left: 0px; margin-right: 0px; ">

	</div>

	<div class="iushe  diyi-s" id="result" style="">
		<table id="qyList" class="hovertable" style="width: 100%">
			<tbody class="companyList" id="companyList">

			</tbody>
		</table>
	</div>
	<!--第二-->
	<div class="btnSearch  dier-s">
		<input type="text" class="sousuors" name="log_company" id="log_company" value="" /><button class="uyrse"
			id="logBtnSearch">搜 索</button>
	</div>

	<div class="iushe dier-s" id="result" style="">
		<table id="qyList-2" class="hovertable" style="width: 100%">
			<tbody class="companyList" id="checkLog">

			</tbody>
		</table>
	</div>
</div>

<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=9DbR7Ge0vRY3qtiPeVStVve3"></script>
<script type="text/javascript" src="/js/admin/map.js"></script>
<script>
	var refurl = document.referrer;
	if (refurl.indexOf("mapall") > -1 || refurl.indexOf("map3") > -1) {
		document.getElementById("btndiv").style.display = "flex";
	}
	function tomap3(){
		window.location.href='/admin/map3'
	}
	function tomap1(){
		window.location.href='/admin/map'
	}
	function tomapall(){
		window.location.href='/admin/mapall'
	}
</script>
@endsection
